"use strict"

/**
 * 锦州市政府采购网爬虫
 *  
 */
 
//有验证码

var Base = require("./base");
var jz_spider = new Base();
jz_spider.name = "锦州市政府采购网";
jz_spider.page = 1;
jz_spider.enabled = false;

jz_spider.getPageUrl = function(pg) {
    return "http://www.jztb.gov.cn/frontpage/second.jsp?intx=4&inty=1&intz=2&mdid=120019,1200192,1200193,1200194,1200195,1200196,1200197,1200198,1203029,1203138,1203144&pageNum=50";
};

jz_spider.getItems = function($) {
    var items = [];
    $(".mConList ul li a").each(function(index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.text();
        item.url = "http://www.jztb.gov.cn" + e.attr("href");
        console.log(item.url);
        item.source = jz_spider.name;
        items.push(item);
    });
    return items;
};

exports = module.exports = jz_spider;